package com.mbyte.easy.admin.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.mbyte.easy.admin.entity.Draft;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lp
 * @since 2019-12-12
 */
public interface DraftMapper extends BaseMapper<Draft> {

    List<Draft> listPage(@Param("page") IPage<Draft> page, @Param(Constants.WRAPPER)QueryWrapper<Draft> queryWrapper);

    /**
     *  插入，返回住建
     * @param draft
     */
    void insert2Id(Draft draft);
    List<Draft> selectDraft(Long userid);


    String getTitleById(Long draftId);

    String getFileNameById(Long draftId);

    List<Draft> listPage(@Param("page") IPage<Draft> page,@Param(Constants.WRAPPER) QueryWrapper<Draft> queryWrapper,Long idByUserName);

    List<Draft> pageList(@Param("page") IPage<Draft> page,@Param(Constants.WRAPPER) QueryWrapper<Draft> queryWrapper);

    List<Draft>selectPageList(@Param("page") IPage<Draft> page,Long idByUserName,@Param(Constants.WRAPPER) QueryWrapper<Draft> queryWrapper);


}
